<div class="menu_list">
<table id="menulist" class="item_list" cellspacing="0" cellpadding="0" border="0">
	<thead class="fields">
        <tr>
            <th class="first center">&nbsp;&nbsp;#&nbsp;&nbsp;</th>
            <th><?php echo ucfirst($txt->getWord('title')); ?></th>
            <th><?php echo ucfirst($txt->getWord('active')); ?></th>
            <th><?php echo ucfirst($txt->getWord('edit')); ?></th>
            <th class="last"><?php echo ucfirst($txt->getWord('delete')); ?></th>
        </tr>
    </thead>
    <tbody>
        <tr class="items">
            <td class="first center">0</td>
            <td><input class="medium" id="new_s" name="new_s[]" type="text" value="" maxlength="50" /></td>
            <td colspan="">&nbsp;</td>
            <td class="center">
            	<img 
                	title="<?php echo ucfirst($txt->getWord('new')); ?>"
                    class="icon command" 
                    src="<?php echo SYSICONS_URL; ?>add_16.gif" 
                    onclick="if(document.getElementById('new_s').value != '') { edit_form.submit(); }" />
            </td>
            <td class="last">&nbsp;</td>
        </tr>
        <?php 
        if($surveyAdmin->Survey):
		$surveyAdmin->Survey->loadSections();
        foreach($surveyAdmin->Survey->Sections as $section)
        {
			?>
			<tr class="items">
				<td class="first center"><?php echo $section->getId(); ?><input type="hidden" name="s_id[]" value="<?php echo $section->getId(); ?>" /></td>
				<td>
					<input class="medium" name="s_title[]" type="text" value="<?php echo $section->getTitle(); ?>" maxlength="50" />
				</td>
				<td class="center">
					<?php echo $commander->getActivationFieldsObject($section); ?>
					<input type="hidden" name="s_active[]" value="<?php echo $section->getActive(); ?>" />
				</td>
				<td class="center">
					<a href="?con=<?php echo $_REQUEST['con']; ?>&s=<?php echo $section->getId(); ?>"><img title="<?php echo ucfirst($txt->getWord('edit')); ?>" class="icon command" src="<?php echo SYSICONS_URL; ?>configure_16.gif" onclick="edit_form.submit();"  /></a>
				</td>
				<td class="last center">
					<input title="<?php echo ucfirst($txt->getWord('delete')); ?>" class="inp_image" type="image" name="delete_s" src="<?php echo SYSICONS_URL; ?>delete_16.gif" value="0" onclick="this.value='<?php echo $section->getId(); ?>'; edit_form.submit();" />
				</td>
			</tr>
			<?php
        }
        endif; 
        ?>
	</tbody>
</table>
</div>